#include <stm8s_clk.h>

void CLK_CCOConfig(CLK_Output_TypeDef CLK_CCO)
{
  /* check the parameters */
  assert_param(IS_CLK_OUTPUT_OK(CLK_CCO));
  
  /* Clears of the CCO type bits part */
  CLK->CCOR &= (uint8_t)(~CLK_CCOR_CCOSEL);
  
  /* Selects the source provided on cco_ck output */
  CLK->CCOR |= (uint8_t)CLK_CCO;
  
  /* Enable the clock output */
  CLK->CCOR |= CLK_CCOR_CCOEN;
}

/**
  * @brief   Enables or disables the specified CLK interrupts.
  * @param   CLK_IT This parameter specifies the interrupt sources.
  * It can be one of the values of @ref CLK_IT_TypeDef.
  * @param   NewState New state of the Interrupt.
  * Value accepted ENABLE, DISABLE.
  * @retval None
  */
